<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>背景</title>
    <style>
        div {
            width: 500px;
            height: 300px;
            /*background-color: deepskyblue;*/
            background-image: url("./image/1.jpg");
            background-size: 500px 300px;
            /*  图片不重复*/
            background-repeat: no-repeat;
            /*图片居中*/
            background-position: center;
        }
    </style>
</head>
<body>
<div></div>
</body>
</html>